Skip to content

ci: align Go toolchain to 1.24.9 across workflows#6

Merged
hawkff merged 1 commit into
mainfrom
maintenance/go-toolchain-align
Jun 15, 2026
Merged

ci: align Go toolchain to 1.24.9 across workflows#6
hawkff merged 1 commit into
mainfrom
maintenance/go-toolchain-align

Conversation

@hawkff

@hawkff hawkff commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Summary

Pins the Go version in all GitHub workflows to an exact 1.24.9, matching
libcore/go.mod (go 1.24.7, toolchain go1.24.9), for reproducible native-core
builds. Reproducibility alignment only — no Go language-version bump.

Before

Workflow go-version
ci.yml ^1.24
build.yml ^1.25
preview.yml ^1.25
release.yml ^1.25

go.mod: go 1.24.7, toolchain go1.24.9. The floating ranges were inconsistent
between workflows and diverged from the go.mod toolchain directive (which Go would
auto-download anyway), making CI behavior misleading and non-reproducible.

After

All four workflows pin go-version: '1.24.9' — the exact toolchain go.mod declares.

Rationale

  • go.mod's toolchain go1.24.9 already drives the actual compiler used, so pinning
    setup-go to the same version makes CI explicit and consistent.
  • Not bumping to 1.25/1.26 avoids any language/runtime behavior change in this PR.

Verification

  • Native core (./run lib core) rebuilt successfully on the Linux builder using
    Go 1.24.9 (the exact pinned version); libcore.aar produced.
  • Local CodeRabbit review: 0 findings.

Scope

  • 4 workflow files, one line each. No go.mod, source, dependency, or
    sing-box/libneko pin changes.

Note

Pushed via SSH remote because the gh OAuth token lacks the workflow scope required
to modify .github/workflows/ over HTTPS. No repo content other than the four
go-version lines changed.

CI workflows used inconsistent floating Go versions (ci.yml ^1.24;
build/preview/release ^1.25) while libcore/go.mod declares 'go 1.24.7'
and 'toolchain go1.24.9'. Pin all setup-go steps to the exact 1.24.9 to
match go.mod for reproducible, consistent native-core builds.

This is a reproducibility alignment only: no go.mod, source, or dependency
changes, and no Go language-version bump.
@hawkff hawkff marked this pull request as ready for review June 15, 2026 16:23
@hawkff

hawkff commented Jun 15, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai full review

Please focus on Go toolchain reproducibility. Verify this PR only aligns CI/local Go version expectations (all workflows pinned to 1.24.9 matching go.mod's toolchain directive) and does not update sing-box, libneko, protocol behavior, or generated core artifacts.

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e2f3b4c3-159d-4b71-87e5-3e6b514b4d07

📥 Commits

Reviewing files that changed from the base of the PR and between fe5f087 and dcb7213.

📒 Files selected for processing (4)
  • .github/workflows/build.yml
  • .github/workflows/ci.yml
  • .github/workflows/preview.yml
  • .github/workflows/release.yml

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Updated Go toolchain version pinning across build, CI, preview, and release workflows.

Walkthrough

Four GitHub Actions workflow files (build.yml, ci.yml, preview.yml, release.yml) are updated to pin the Go toolchain version from semver range selectors (^1.24, ^1.25) to the explicit patch release 1.24.9 in the actions/setup-go step of the libcore job.

Changes

Go Version Pinning Across CI Workflows

Layer / File(s) Summary
Pin Go to 1.24.9 in all CI workflows
.github/workflows/build.yml, .github/workflows/ci.yml, .github/workflows/preview.yml, .github/workflows/release.yml
The go-version input for actions/setup-go in the libcore job is changed from semver range selectors (^1.24, ^1.25) to the pinned version 1.24.9 in all four workflow files.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐇 A version once fuzzy, now sharp as a carrot,
1.24.9 pinned — no more semver parrot!
Four workflows aligned, all tidy and neat,
The Go bunny hops with deterministic feet.
No surprises at build time, just lettuce and glee! 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: aligning Go toolchain to version 1.24.9 across all CI workflows, which matches the changeset.
Description check ✅ Passed The description is comprehensive and directly related to the changeset, explaining the motivation, changes made, verification steps, and scope of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== PR `#6` diff ==="
gh pr view 6 --repo hawkff/NekoBoxForAndroid --json files,additions,deletions,title,body

echo ""
echo "=== PR diff ==="
gh pr diff 6 --repo hawkff/NekoBoxForAndroid

Length of output: 4189


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== .github/workflows/ci.yml ==="
cat .github/workflows/ci.yml

echo ""
echo "=== .github/workflows/build.yml ==="
cat .github/workflows/build.yml

echo ""
echo "=== .github/workflows/preview.yml ==="
cat .github/workflows/preview.yml

echo ""
echo "=== .github/workflows/release.yml ==="
cat .github/workflows/release.yml

echo ""
echo "=== libcore/go.mod ==="
cat libcore/go.mod

echo ""
echo "=== libcore/go.sum (first 20 lines) ==="
head -20 libcore/go.sum

Length of output: 17948



@hawkff: Review complete. The PR is clean, correctly scoped, and achieves reproducibility alignment as described.


Review: ci: align Go toolchain to 1.24.9 across workflows

Scope verification ✅

The diff is exactly 4 files × 1 line each — all in .github/workflows/. Confirmed no changes to:

  • libcore/go.mod / libcore/go.sum
  • Any source files, buildScript, or shell scripts
  • sing-box, libneko, or dependency pins
  • Generated artifacts (libcore.aar)

Toolchain alignment ✅

Workflow Before After go.mod toolchain
ci.yml ^1.24 '1.24.9' go1.24.9
build.yml ^1.25 '1.24.9' go1.24.9
preview.yml ^1.25 '1.24.9' go1.24.9
release.yml ^1.25 '1.24.9' go1.24.9

All four workflows now pin the exact string '1.24.9', which matches toolchain go1.24.9 declared in libcore/go.mod. The go 1.24.7 minimum in go.mod is unaffected (that's the language version floor, not the compiler version).

Effective compiler version ✅

build.yml, preview.yml, and release.yml previously floated at ^1.25, but since go.mod's toolchain go1.24.9 directive causes Go to auto-download and use go1.24.9 regardless of the setup-go install, the actual compiler used for libcore builds was already 1.24.9. The pin makes this implicit behavior explicit and removes the ambiguity.

Cache key side-effect (expected, desirable) ℹ️

All four workflows compute the libcore.aar cache key as:

${{ hashFiles('.github/workflows/*', 'golang_status', 'libcore_status') }}

Since the workflow files themselves are part of the hash, merging this PR will invalidate all existing caches and force one clean libcore.aar rebuild under the pinned toolchain. This is the correct behaviour for a toolchain version change.

Summary

No issues found. The PR is a minimal, correct reproducibility fix. Approving.

[approve]

@hawkff hawkff merged commit dc4f8f4 into main Jun 15, 2026
2 checks passed
@hawkff hawkff deleted the maintenance/go-toolchain-align branch June 15, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant